<template>
  <div id="bookmain">
    <ul>
      <li v-for="(value,key,index) in books" :key="index" @touchstart="gobookcontent">
        <img :src="value.img" alt @touchstart="gobookcontent" />
        <div>
          <p @touchstart="gobookcontent">{{value.name}}</p>
          <p @touchstart="gobookcontent">{{value.author}}</p>
        </div>
      </li>
    </ul>
    <div class="bottom">
      <div>
        <hr />
        <span>我是有底线的</span>
        <hr />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      books: {
        book1: {
          name: "浮",
          author: "曹雪芹",
          img: require("@/assets/书架/u1703.png")
        },
        book2: {
          name: "也许 你该找个人聊聊",
          author: "曹雪芹",
          img: require("@/assets/书架/u1715.png")
        },
        book3: {
          name: "从零开始的女权主义",
          author: "曹雪芹",
          img: require("@/assets/书架/u1727.png")
        },
        book4: {
          name: "浮",
          author: "曹雪芹",
          img: require("@/assets/书架/u1703.png")
        },
        book5: {
          name: "也许 你该找个人聊聊",
          author: "曹雪芹",
          img: require("@/assets/书架/u1715.png")
        },
        book6: {
          name: "从零开始的女权主义",
          author: "曹雪芹",
          img: require("@/assets/书架/u1727.png")
        },
        book7: {
          name: "浮",
          author: "曹雪芹",
          img: require("@/assets/书架/u1703.png")
        },
        book8: {
          name: "也许 你该找个人聊聊",
          author: "曹雪芹",
          img: require("@/assets/书架/u1715.png")
        },
        book9: {
          name: "从零开始的女权主义",
          author: "曹雪芹",
          img: require("@/assets/书架/u1727.png")
        }
      }
    };
  },
  methods: {
    gobookcontent() {
    }
  }
};
</script>

<style lang="less" scoped>
#bookmain {
  .bottom {
    width: 100%;
    height: 1.65rem;
    font-size: 1.2rem;
    color: #cccccc;
    padding-top: 2rem;
    div {
      font-family: "SourceHanSansSC-Normal", "思源黑体 Normal", "思源黑体";
      font-weight: 400;
      font-style: normal;
      text-align: left;
      height: 1.65rem;
      line-height: 1.65rem;
      position: relative;
      span {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
      }
      hr:nth-of-type(1) {
        position: absolute;
        width: 10rem;
        top: 50%;
        left: 3rem;
        transform: translateY(-50%);
        border: .1rem solid #f2f2f2;
      }
      hr:nth-of-type(2) {
        position: absolute;
        width: 10rem;
        top: 50%;
        right: 3rem;
        transform: translateY(-50%);
        border: .1rem solid #f2f2f2;
      }
    }
  }
  ul {
    list-style: none;
    li {
      display: flex;
      margin-bottom: 1.5rem;
      &:last-of-type {
        margin-bottom: 0;
      }
      img {
        border-radius: .5rem;
      }
      div {
        margin-left: 1rem;
        margin-top: .5rem;
        p {
          &:first-of-type {
            font-family: "PingFangSC-Semibold", "PingFang SC Semibold",
              "PingFang SC";
            font-weight: 650;
            font-style: normal;
            font-size: 1.5rem;
            color: #2b3133;
            text-align: left;
            margin-bottom: 1rem;
          }
          &:last-of-type {
            font-family: "PingFangSC-Regular", "PingFang SC";
            font-weight: 400;
            font-style: normal;
            font-size: 1.2rem;
            color: #95a1a6;
            text-align: left;
          }
        }
      }
    }
  }
}
</style>